<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>    
	{*include file="template/admin_head_plugin.htm"*}
	</head>

    <body style="background:none;">
    
    {*if $cf_action=='copy'*}
    <script type="text/javascript">
            $(function(){
				 $("#list_form").submit(function(){
					 if($("#sendto").val()==''){
						 my_alert('请输入被分配的组长','操作提示',"$('#sendto').focus()");
                         return false; 
					   }
					   
                    if(confirm('确认提交吗?')==false){
                        return false;
                       }
					 return true;
                   });
				  
				  //输入框加载下拉提示 
				$("#sendto").autocomplete(admin_user, {
						minChars: 1,
						max: 12,
						autoFill: false,
						mustMatch: true,
						matchContains: false,
						scrollHeight: 220,
						width:300,
						multiple:false,
						formatItem: function(row, i, max) {
							return "<span>"+row.key+"</span><span>"+row.name+"</span><b>"+row.group+"</b>";
						},
						formatMatch: function(row, i, max) {
							if(row.root=='{*$smarty.const.SALES_DPT*}')
								return row.keyname;
								else
								return false;
						},
						formatResult: function(row,value) {								//返回结果
							return row.key;
						}
					});		
					
					$("#sendto").result(function(event, row, formatted) {			
						$("#senduid").val(row.id);
						$("#sendgid").val(row.gid);
					});
	
            })

        </script>
    <div class="content_panel_title">
      <div class="contentpanelcenter"><span class="contentpanelcenter_font">复制权限--需要复制的组别</span></div>
      <div class="contentpanelrihgt"></div>
    </div>
    <div class="content_table_center_style">
      <div class="p8">
        <form name="list_form" id="list_form" method="post" action="{*$cf_self_page*}">
        <input name="act" type="hidden" value="copy" />
        <input name="listid" type="hidden" value="{*$listid*}" />         
                 
          <table width="100%" class="tbl tbl_nbr">
            <thead>
              <tr class="thd">
                <td width="12%" align="center" class="thr">组ID</td>
                <td width="12%" align="center" class="thr">权限组</td>
                <td width="8%" align="center" class="thr">职能权限</td>
                <td width="8%" align="center" class="thr">&nbsp;</td>
              </tr>
            </thead>
            <tbody>
              {*foreach name=lead_part item=item from=$data_ary*}
              {*assign var=check value=$item['lead_check']*}
              {*assign var=level value=$item['lead_level']*}
              {*assign var=status value=$item['lead_all_status']*}
              {*assign var=send value=$item['lead_issend']*}
              {*assign var=reason value=$item['lead_reason']*}
              {*assign var=sex value=$item['lead_sex']*}
              {*assign var=type value=$item['g_type']*}
             
              <tr onmouseout="this.style.backgroundColor='#ffF'" onmouseover="this.style.backgroundColor='#ffC'" style=" background-color:#FFFFFF">
                <td align="center">{*$item['g_id']*}</td>
                <td align="left" class="tips" >{*$item['indent']*}<span class="blue">{*$item['g_title']*}</span>{*if $item['g_club_type']*}&nbsp;({*$item['g_club_type']*}){*/if*}</td>
                <td align="center">{*$cf_info_var[1][$type]*}</td>
                <td align="center">&nbsp;</td>
              </tr>
              {*/foreach*}
              <tr class="tft">
                <td colspan="4" style="padding:0;"><table width="100%" border="0">
                  <tr>
                    <td width="6%" align="center" style="border:0;padding:0;">复制:</td>
                    <td width="31%" align="left" style="border:0;padding:0;"><span class="pt">
                      {*html_options name=gid options=$group selected=$gid*}
                    </span>&nbsp;
                    <input type="submit" name="submit_all" id="submit_all" value="提交操作" class="myinput" /></td>
                    <td width="63%" style="border:0;padding:0;" ><div class="turnPage">
                      <p>&nbsp;</p>
                    </div></td>
                  </tr>
                </table></td>
              </tr>
               
            </tbody>
            
          </table>
        </form>  
      </div>
    </div>
    
   	{*elseif $cf_action=='copyviewpower'*}    
       <script type="text/javascript">
            $(function(){
				 $("#list_form").submit(function(){
					 if($("#sendto").val()==''){
						 my_alert('请输入被分配的组长','操作提示',"$('#sendto').focus()");
                         return false; 
					   }
					   
                    if(confirm('确认提交吗?')==false){
                        return false;
                       }
					 return true;
                   });
				  
				  //输入框加载下拉提示 
				$("#sendto").autocomplete(admin_user, {
						minChars: 1,
						max: 12,
						autoFill: false,
						mustMatch: true,
						matchContains: false,
						scrollHeight: 220,
						width:300,
						multiple:false,
						formatItem: function(row, i, max) {
							return "<span>"+row.key+"</span><span>"+row.name+"</span><b>"+row.group+"</b>";
						},
						formatMatch: function(row, i, max) {
							if(row.root=='{*$smarty.const.SALES_DPT*}')
								return row.keyname;
								else
								return false;
						},
						formatResult: function(row,value) {								//返回结果
							return row.key;
						}
					});		
					
					$("#sendto").result(function(event, row, formatted) {			
						$("#senduid").val(row.id);
						$("#sendgid").val(row.gid);
					});
	
            })

        </script>
        <div class="content_panel_title">
          <div class="contentpanelcenter"><span class="contentpanelcenter_font">复制浏览权限--复制源组别</span></div>
          <div class="contentpanelrihgt"></div>
        </div>
        <div class="content_table_center_style">
          <div class="p8">
            <form name="list_form" id="list_form" method="post" action="{*$cf_self_page*}">
            <input name="act" type="hidden" value="copyviewpower" />
            <input name="listid" type="hidden" value="{*$listid*}" />         
                     
              <table width="100%" class="tbl tbl_nbr">
                <thead>
                  <tr class="thd">
                    <td width="12%" align="center" class="thr">组ID</td>
                    <td width="12%" align="center" class="thr">权限组</td>
                    <td width="8%" align="center" class="thr">职能权限</td>
                    <td width="8%" align="center" class="thr">&nbsp;</td>
                  </tr>
                </thead>
                <tbody>
                  {*foreach name=lead_part item=item from=$data_ary*}
                  {*assign var=check value=$item['lead_check']*}
                  {*assign var=level value=$item['lead_level']*}
                  {*assign var=status value=$item['lead_all_status']*}
                  {*assign var=send value=$item['lead_issend']*}
                  {*assign var=reason value=$item['lead_reason']*}
                  {*assign var=sex value=$item['lead_sex']*}
                  {*assign var=type value=$item['g_type']*}
                 
                  <tr onmouseout="this.style.backgroundColor='#ffF'" onmouseover="this.style.backgroundColor='#ffC'" style=" background-color:#FFFFFF">
                    <td align="center">{*$item['g_id']*}</td>
                    <td align="left" class="tips" >{*$item['indent']*}<span class="blue">{*$item['g_title']*}</span>{*if $item['g_club_type']*}&nbsp;({*$item['g_club_type']*}){*/if*}</td>
                    <td align="center">{*$cf_info_var[1][$type]*}</td>
                    <td align="center">&nbsp;</td>
                  </tr>
                  {*/foreach*}
                  <tr class="tft">
                    <td colspan="4" style="padding:0;"><table width="100%" border="0">
                      <tr>
                        <td width="6%" align="center" style="border:0;padding:0;">复制:</td>
                        <td width="31%" align="left" style="border:0;padding:0;"><span class="pt">
                          {*html_options name=gid options=$group selected=$gid*}
                        </span>&nbsp;
                        <input type="submit" name="submit_all" id="submit_all" value="提交操作" class="myinput" /></td>
                        <td width="63%" style="border:0;padding:0;" ><div class="turnPage">
                          <p>&nbsp;</p>
                        </div></td>
                      </tr>
                    </table></td>
                  </tr>
                   
                </tbody>
                
              </table>
            </form>  
          </div>
        </div>
    
    {*elseif $cf_action=='addviewpower'*}
    
    	 <script type="text/javascript">
            $(function(){				
				 $("#list_form").submit(function(){					
					 if($("#power_id").val()==''){
						 my_alert('请输入权限ID','操作提示',"$('#power_id').focus()");
                         return false; 
					   }
					   
                    if(confirm('确认提交吗?')==false){
                        return false;
                       }
					 return true;
                   });
            })

        </script>
    <div class="content_panel_title">
            <div class="contentpanelleft"></div>
            <div class="contentpanelcenter">
          <span class="contentpanelcenter_font">添加浏览权限--被选中的组别</span></div>
            <div class="contentpanelrihgt"></div>
        </div>
    <div class="content_table_center_style">
      <div class="p8">
        <form name="list_form" id="list_form" method="post" action="{*$cf_self_page*}">
          <input name="act" type="hidden" value="addviewpower" />
          <input name="listid" type="hidden" id="listid" value="{*$listid*}" />
          <table width="100%" class="tbl tbl_nbr">
            <thead>
              <tr class="thd">
                <td width="12%" align="center" class="thr">组ID</td>
                <td width="12%" align="center" class="thr">权限组</td>
                <td width="8%" align="center" class="thr">职能权限</td>
                <td width="8%" align="center" class="thr">&nbsp;</td>
              </tr>
            </thead>
            <tbody>
              {*foreach name=lead_part item=item from=$data_ary*}
              {*assign var=check value=$item['lead_check']*}
              {*assign var=level value=$item['lead_level']*}
              {*assign var=status value=$item['lead_all_status']*}
              {*assign var=send value=$item['lead_issend']*}
              {*assign var=reason value=$item['lead_reason']*}
              {*assign var=sex value=$item['lead_sex']*}
              {*assign var=type value=$item['g_type']*}
              <tr onmouseout="this.style.backgroundColor='#ffF'" onmouseover="this.style.backgroundColor='#ffC'" style=" background-color:#FFFFFF">
                <td align="center">{*$item['g_id']*}</td>
                <td align="left" class="tips" >{*$item['indent']*}
                  <span class="blue">
                    {*$item['g_title']*}
                  </span>
                  {*if $item['g_club_type']*}
                  &nbsp;(
                  {*$item['g_club_type']*}
                  )
                  {*/if*}</td>
                <td align="center">{*$cf_info_var[1][$type]*}</td>
                <td align="center">&nbsp;</td>
              </tr>
              {*/foreach*}
              <tr class="tft">
                <td colspan="4" style="padding:0;"><table width="100%" border="0">
                  <tr>
                    <td width="35%" align="center" style="border:0;padding:0;"><span class="thr">添加权限ID:</span>
                      <input name="power_id" type="text" id="power_id" size="35" />
                    </td>
                    <td width="65%" align="left" style="border:0;padding:0;">&nbsp;
                      <input type="submit" name="submit_all2" id="submit_all2" value="提交操作" class="myinput" /></td>
                  </tr>
                </table></td>
              </tr>
            </tbody>
          </table>
        </form>
      </div>
    </div>
    
    {*elseif $cf_action=='delpower'*}
    
    <script type="text/javascript">
            $(function(){
				 $("#list_form").submit(function(){					 
					 if($("#power_id").val()==''){
						 my_alert('请输入权限ID','操作提示',"$('#power_id').focus()");
                         return false; 
					   }
					   
                    if(confirm('确认提交吗?')==false){
                        return false;
                       }
					 return true;
                   });
            })

        </script>
    <div class="content_panel_title">
            <div class="contentpanelleft"></div>
            <div class="contentpanelcenter">
      <span class="contentpanelcenter_font">删除操作权限--被选中的组别</span></div>
            <div class="contentpanelrihgt"></div>
    </div>

    <div class="content_table_center_style">
      <div class="p8">
      <form name="list_form" id="list_form" method="post" action="{*$cf_self_page*}">
        <input name="act" type="hidden" value="delpower" />
        <input name="listid" type="hidden" value="{*$listid*}" />   
      <table width="100%" class="tbl tbl_nbr">
            <thead>
              <tr class="thd">
                <td width="12%" align="center" class="thr">组ID</td>
                <td width="12%" align="center" class="thr">权限组</td>
                <td width="8%" align="center" class="thr">职能权限</td>
                <td width="8%" align="center" class="thr">&nbsp;</td>
              </tr>
            </thead>
            <tbody>
              {*foreach name=lead_part item=item from=$data_ary*}
              {*assign var=check value=$item['lead_check']*}
              {*assign var=level value=$item['lead_level']*}
              {*assign var=status value=$item['lead_all_status']*}
              {*assign var=send value=$item['lead_issend']*}
              {*assign var=reason value=$item['lead_reason']*}
              {*assign var=sex value=$item['lead_sex']*}
              {*assign var=type value=$item['g_type']*}
             
              <tr onmouseout="this.style.backgroundColor='#ffF'" onmouseover="this.style.backgroundColor='#ffC'" style=" background-color:#FFFFFF">
                <td align="center">{*$item['g_id']*}</td>
                <td align="left" class="tips" >{*$item['indent']*}<span class="blue">{*$item['g_title']*}</span>{*if $item['g_club_type']*}&nbsp;({*$item['g_club_type']*}){*/if*}</td>
                <td align="center">{*$cf_info_var[1][$type]*}</td>
                <td align="center">&nbsp;</td>
              </tr>
              {*/foreach*}
              <tr class="tft">
                <td colspan="4" style="padding:0;"><table width="100%" border="0">
                  <tr>
                    <td width="35%" align="center" style="border:0;padding:0;"><span class="thr">删除权限ID:
                      <input name="power_id" type="text" id="power_id" size="35" />
                    </span></td>
                    <td width="65%" align="left" style="border:0;padding:0;">&nbsp;
                    <input type="submit" name="submit_all" id="submit_all" value="提交操作" class="myinput" /></td>
                  </tr>
                </table></td>
              </tr>
               
            </tbody>
            
          </table>
        </form>
      </div>
    </div>
    
    {*else*}
    
      <script type="text/javascript">
            $(function(){				
				 $("#list_form").submit(function(){					
					 if($("#power_id").val()==''){
						 my_alert('请输入权限ID','操作提示',"$('#power_id').focus()");
                         return false; 
					   }
					   
                    if(confirm('确认提交吗?')==false){
                        return false;
                       }
					 return true;
                   });
            })

        </script>
    <div class="content_panel_title">
            <div class="contentpanelleft"></div>
            <div class="contentpanelcenter">
          <span class="contentpanelcenter_font">添加操作权限--被选中的组别</span></div>
            <div class="contentpanelrihgt"></div>
        </div>
    <div class="content_table_center_style">
      <div class="p8">
        <form name="list_form" id="list_form" method="post" action="{*$cf_self_page*}">
          <input name="act" type="hidden" value="addpower" />
          <input name="listid" type="hidden" id="listid" value="{*$listid*}" />
          <table width="100%" class="tbl tbl_nbr">
            <thead>
              <tr class="thd">
                <td width="12%" align="center" class="thr">组ID</td>
                <td width="12%" align="center" class="thr">权限组</td>
                <td width="8%" align="center" class="thr">职能权限</td>
                <td width="8%" align="center" class="thr">&nbsp;</td>
              </tr>
            </thead>
            <tbody>
              {*foreach name=lead_part item=item from=$data_ary*}
              {*assign var=check value=$item['lead_check']*}
              {*assign var=level value=$item['lead_level']*}
              {*assign var=status value=$item['lead_all_status']*}
              {*assign var=send value=$item['lead_issend']*}
              {*assign var=reason value=$item['lead_reason']*}
              {*assign var=sex value=$item['lead_sex']*}
              {*assign var=type value=$item['g_type']*}
              <tr onmouseout="this.style.backgroundColor='#ffF'" onmouseover="this.style.backgroundColor='#ffC'" style=" background-color:#FFFFFF">
                <td align="center">{*$item['g_id']*}</td>
                <td align="left" class="tips" >{*$item['indent']*}
                  <span class="blue">
                    {*$item['g_title']*}
                  </span>
                  {*if $item['g_club_type']*}
                  &nbsp;(
                  {*$item['g_club_type']*}
                  )
                  {*/if*}</td>
                <td align="center">{*$cf_info_var[1][$type]*}</td>
                <td align="center">&nbsp;</td>
              </tr>
              {*/foreach*}
              <tr class="tft">
                <td colspan="4" style="padding:0;"><table width="100%" border="0">
                  <tr>
                    <td width="35%" align="center" style="border:0;padding:0;"><span class="thr">添加权限ID:</span>
                      <input name="power_id" type="text" id="power_id" size="35" />
                    </td>
                    <td width="65%" align="left" style="border:0;padding:0;">&nbsp;
                      <input type="submit" name="submit_all2" id="submit_all2" value="提交操作" class="myinput" /></td>
                  </tr>
                </table></td>
              </tr>
            </tbody>
          </table>
        </form>
      </div>
    </div>
    {*/if*}
   </body>
</html>